package com.zj.system.controller;

import com.seventh.common.pojo.R;
import com.zj.system.utils.AliyunSmsUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping({"system/sms"})
@ApiModel(
        value = "发送短信控制层",
        description = "发送短信控制层"
)
public class SmsController {
    public SmsController() {
    }

    @GetMapping({"{phonenumber}"})
    public R sendSms(@ApiParam("手机号") @PathVariable("phonenumber") String phonenumber) {
        String s = AliyunSmsUtil.sendSms(phonenumber);
        return R.ok().put("mcode", s);
    }
}
